package com.daka.service.impl;

import com.daka.dao.ActivityMapper;
import com.daka.entity.Activity;
import com.daka.service.ActivityService;
import com.daka.vo.request.AddressActVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author beliveli on 2016/3/31 0031.
 */
@Service("activityService")
@SuppressWarnings("unused")
public class ActivityServiceImpl implements ActivityService {

    @Resource(name = "activityMapper")
    private ActivityMapper activityMapper;

    public Activity selectById(int id) {
        return activityMapper.selectById(id);
    }

    public List<Activity> selectAll() {
        return activityMapper.selectAll();
    }


    public List<Activity> selectByGroup(int groupId) {
        return activityMapper.selectByGroup(groupId);
    }

    public List<Activity> selectPageByGroup(Integer groupId, String activityName, Integer pageIndex, Integer pageSize) {
        return activityMapper.selectPageByGroup(groupId, activityName, pageIndex, pageSize);
    }

    public int selectCountByGroup(Integer groupId, String activityName) {
        return activityMapper.selectCountByGroup(groupId, activityName);
    }

    public List<Activity> selectByUser(int userId) {
        return activityMapper.selectByUser(userId);
    }


    @Override
    public List<Activity> selectByAddressTemp(AddressActVo vo) {
        return activityMapper.selectByAddressTemp(vo);
    }

}
